package com.jason.designpattern.singleton;

/**
 * @description: 懒汉模式A
 * 优点：实现了懒加载
 * 缺点：线程不安全
 * @author: jason.jia
 * @create: 2019-03-08 16:56
 **/
public class LazySingletonA {

    private static LazySingletonA instance;

    private LazySingletonA(){}

    public static LazySingletonA getInstance(){
        if(instance == null){
            instance = new LazySingletonA();
        }
        return instance;
    }
}
